#-------------------------------------------------------------------------------
#	file Makefile
#	brief
#		sm-test makefile
#
#	$Id: Makefile 235 2014-01-14 02:54:35Z ac.verbeck@gmail.com $
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#	Copyright and Disclaimer Notice
#
#	Copyright (c) 2012 A.C. Verbeck
#
#	This file is part of SM: A State Machine Library.
#
#	SM is free software: you can redistribute it and/or modify
#	it under the terms of the GNU General Public License as published by
#	the Free Software Foundation, either version 3 of the License, or
#	(at your option) any later version.
#
#	SM is distributed in the hope that it will be useful,
#	but WITHOUT ANY WARRANTY; without even the implied warranty of
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#	GNU General Public License for more details.
#
#	You should have received a copy of the GNU General Public License
#	along with SM.  If not, see <http://www.gnu.org/licenses/>.
#
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#	Environment
#-------------------------------------------------------------------------------
CC			= g++
BLD			= bldinfo
CPPFLAGS	= -Wall -Werror -ggdb --std=c++11 -DBLD_DEBUG
LDLIBS		= -lpopt

#-------------------------------------------------------------------------------
#	Build environment
#-------------------------------------------------------------------------------
BLD_TARGET	= bi
BLD_VERSION	= 1.00

#-------------------------------------------------------------------------------
#	Targets
#-------------------------------------------------------------------------------
TARGET		= sm-test

#-------------------------------------------------------------------------------
#	Object files
#-------------------------------------------------------------------------------
OBJS_BI		= bi.o
OBJS_TARGET	= sm-test.o sm.o debug.o sm-full.o sm-auto.o

#-------------------------------------------------------------------------------
#	Rules
#-------------------------------------------------------------------------------
.PHONY:	all clean format
all:		$(TARGET)

clean:;		$(RM) *.o
			$(RM) *.bak
			$(RM) *.exe
			$(RM) *.cpp.orig
			$(RM) *.h.orig

format:;	astyle --pad-header --unpad-paren --style="k&r" --indent=tab --lineend=windows --recursive "*.cpp" "*.h"

#-------------------------------------------------------------------------------
#	Dependencies
#-------------------------------------------------------------------------------
bldinfo:;	$(RM) bi.cpp bi.h

bi.cpp:
			$(BLD) --cpp --output=$(BLD_TARGET) --project=$(TARGET) --version=$(BLD_VERSION)		

sm-cpp-test.cpp:	bi.cpp

$(TARGET):	$(OBJS_BI) $(OBJS_TARGET)

#
#	End: Makefile
#
